package common.entity;

import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 分页信息
 * @author yuanqinglong
 * @since 2021/3/3 17:12
 */
@Data
public class PageInfo {

    /**
     * 显示行数
     */
    @NotNull(message = "每页显示行数为空")
    private Integer pageSize;

    /**
     * 页码
     */
    @NotNull(message = "分页页码为空")
    private Integer pageNow;


    public Integer getPageOffSet() {
        return (pageNow - 1) * pageSize;
    }
}
